%%

idx = 1;

explist = [];
if exist('C:\Behavior\explist.mat','file')
    load('C:\Behavior\explist.mat');
end


for i = 1:length(explist) 
    if i == idx
        fprintf('%d.\t%s <- SELECTED\n',i,explist(i).name);
    else
        fprintf('%d.\t%s\n',i,explist(i).name);
    end
end

if idx > length(explist)
    fprintf('Create new experiment\n')
end

%%
explist(idx).name = 'Rat Gap Detection in Narrow Band Noise TRAINING PHASES 1 & 2';
explist(idx).description = 'Psychophysical Gap Detection Task with Narrow Band Noise background.  AutoShaping Training.';

explist(idx).useOpenEx = false;

explist(idx).plotfunc = @PlotNB; % plot psychometric function during experiment

% explist(idx).guifunc  = @P; % behavior experiment GUI
% explist(idx).savefunc = @SaveSpecNotch; % function which handles data saving

explist(idx).resultsdir = 'C:\Behavior\Rat NBN Gap Detection\Results\';

explist(idx).ct = 'GB';

explist(idx).module = [];

explist(idx).module(1).type = 'RX6';
explist(idx).module(1).id   = 1;

explist(idx).module(1).path = 'C:\Behavior\Rat NBN Gap Detection\RPvds Files\RX6_Psychophysics_NBN_Gap_AUTOSHAPING.rcx';


if ~isdir(explist(idx).resultsdir)
    mkdir(explist(idx).resultsdir);
end

save('C:\Behavior\explist.mat','explist');

for i = 1:length(explist)
    fprintf('%d.\t%s\n',i,explist(i).name);
end